package com.ruoyi.basic.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basic.mapper.BdCoderuleMapper;
import com.ruoyi.basic.domain.BdCoderule;
import com.ruoyi.basic.service.IBdCoderuleService;

/**
 * 编码规则Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-01-29
 */
@Service
public class BdCoderuleServiceImpl implements IBdCoderuleService 
{
    @Autowired
    private BdCoderuleMapper bdCoderuleMapper;

    /**
     * 查询编码规则
     * 
     * @param bdCrcode 编码规则ID
     * @return 编码规则
     */
    @Override
    public BdCoderule selectBdCoderuleById(String bdCrcode)
    {
        return bdCoderuleMapper.selectBdCoderuleById(bdCrcode);
    }

    /**
     * 查询编码规则列表
     * 
     * @param bdCoderule 编码规则
     * @return 编码规则
     */
    @Override
    public List<BdCoderule> selectBdCoderuleList(BdCoderule bdCoderule)
    {
        return bdCoderuleMapper.selectBdCoderuleList(bdCoderule);
    }

    /**
     * 新增编码规则
     * 
     * @param bdCoderule 编码规则
     * @return 结果
     */
    @Override
    public int insertBdCoderule(BdCoderule bdCoderule)
    {
        return bdCoderuleMapper.insertBdCoderule(bdCoderule);
    }

    /**
     * 修改编码规则
     * 
     * @param bdCoderule 编码规则
     * @return 结果
     */
    @Override
    public int updateBdCoderule(BdCoderule bdCoderule)
    {
        return bdCoderuleMapper.updateBdCoderule(bdCoderule);
    }

    /**
     * 批量删除编码规则
     * 
     * @param bdCrcodes 需要删除的编码规则ID
     * @return 结果
     */
    @Override
    public int deleteBdCoderuleByIds(String[] bdCrcodes)
    {
        return bdCoderuleMapper.deleteBdCoderuleByIds(bdCrcodes);
    }

    /**
     * 删除编码规则信息
     * 
     * @param bdCrcode 编码规则ID
     * @return 结果
     */
    @Override
    public int deleteBdCoderuleById(String bdCrcode)
    {
        return bdCoderuleMapper.deleteBdCoderuleById(bdCrcode);
    }
}
